/**
 * 基础路由
 * @type { *[] }
 */

import Discovery from '@/views/discovery/index'
import Favorite from '@/views/favorite/index'
import Me from '@/views/me/index'
import Book from '@/views/book/index'
import Catalogue from '@/views/catalogue/index'

export const constantRouterMap = [
  {
    path: '/',
    component: () => import('@/views/layouts/index'),
    redirect: '/discovery',
    meta: {
      title: '首页',
      keepAlive: false
    },
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index'),
        meta: { title: '首页', keepAlive: false }
      },
      {
        path: '/about',
        name: 'About',
        component: () => import('@/views/home/about'),
        meta: { title: '关于我', keepAlive: false }
      }
    ]
  },
  {
    path: '/discovery',
    name: 'Discovery',
    component: Discovery,
    meta: { title: 'Discovery', keepAlive: true }
  },
  {
    path: '/view-all',
    name: 'ViewAll',
    component: () => import('@/views/view-all'),
    meta: { title: 'View all', keepAlive: false }
  },
  {
    path: '/favorite',
    name: 'Favorite',
    component: Favorite,
    meta: { title: 'Favorite', keepAlive: false }
  },
  {
    path: '/me',
    name: 'Me',
    component: Me,
    meta: { title: 'Me', keepAlive: false }
  },
  {
    path: '/book',
    name: 'Book',
    component: Book
  },
  {
    path: '/brief-introduction',
    name: 'BriefIntroduction',
    component: () => import('@/views/brief-introduction')
  },
  {
    path: '/catalogue',
    name: 'Catalogue',
    meta: {
      keepAlive: true
    },
    component: Catalogue
  },
  {
    path: '/read',
    name: 'Read',
    component: () => import('@/views/read/index')
  }
]
